package com.mymv.app.mymv.modules.mine.page;


import android.graphics.Rect;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.android.baselibrary.base.BaseActivity;
import com.android.baselibrary.base.standard.YQApi;
import com.android.baselibrary.service.bean.mine.NotificationBean;
import com.android.baselibrary.util.ScreenUtil;
import com.android.baselibrary.widget.title.TitleBuilder;
import com.mymv.app.mymv.R;
import com.mymv.app.mymv.application.IBaseActivity;
import com.mymv.app.mymv.modules.mine.adapter.NotificationAdapter;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

@YQApi(
        swipeback = false,
        openAnimation = -1,
        closAnimatione = -1
)
public class NotificationActivity extends IBaseActivity {

    @BindView(R.id.n_recycler_view)
    RecyclerView mRecyclerView;

    private NotificationAdapter mNotificationAdapter;

    private List<NotificationBean>notificationBeanList = new ArrayList<>();

    @Override
    protected int getLayoutView() {
        return R.layout.activity_notification;
    }

    @Override
    protected void onTitleClickListen(TitleBuilder.TitleButton clicked) {
        switch (clicked) {
            case LEFT:
                finish();
                break;
            case MIDDLE:
                break;
            case RIGHT:
                break;
        }
    }

    @Override
    public void initToolBar(TitleBuilder mTitleBuilder) {
        mTitleBuilder.setMiddleTitleText("通知")
                .setLeftDrawable(R.mipmap.ic_back_brown);
    }

    @Override
    public void initUiAndListener() {

        for (int i = 0; i <2 ; i++) {
            NotificationBean notificationBean = new NotificationBean();
            notificationBeanList.add(notificationBean);
        }

        mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext));
        mNotificationAdapter = new NotificationAdapter(R.layout.item_notification_layout, notificationBeanList);
        mRecyclerView.setAdapter(mNotificationAdapter);
    }
}
